﻿using System;
using System.Collections.Generic;
using System.Text;

namespace System {
	/// <summary>
	/// Event args
	/// </summary>
	public class PackageValueChangedEventArgs : EventArgs {
		#region Fields
		private readonly PackageProperty _property;
		private readonly Object _value;
		private readonly PackageBase _source;
		#endregion
		#region Constructor
		/// <summary>
		/// Initializes a new instance of the <see cref="PackageValueChangedEventArgs"/> class.
		/// </summary>
		public PackageValueChangedEventArgs() {

		}
		/// <summary>
		/// Initializes a new instance of the <see cref="PackageValueChangedEventArgs"/> class.
		/// </summary>
		/// <param name="source">The source.</param>
		/// <param name="property">The property.</param>
		/// <param name="value">The value.</param>
		public PackageValueChangedEventArgs(PackageBase source, PackageProperty property, Object value) {
			_source = source;
			_property = property;
			_value = value;
		}
		#endregion
		#region Public
		/// <summary>
		/// Returns a <see cref="System.String"/> that represents this instance.
		/// </summary>
		/// <returns>
		/// A <see cref="System.String"/> that represents this instance.
		/// </returns>
		public override string ToString() {
			return this.Property.ToString();
		}
		#endregion
		#region Property
		/// <summary>
		/// Gets the property.
		/// </summary>
		/// <value>The property.</value>
		public PackageProperty Property {
			get {
				return _property;
			}
		}
		/// <summary>
		/// Gets the value.
		/// </summary>
		/// <value>The value.</value>
		public Object Value {
			get {
				return _value;
			}
		}
		/// <summary>
		/// Gets the source.
		/// </summary>
		/// <value>The source.</value>
		public PackageBase Source {
			get {
				return _source;
			}
		}
		#endregion
	}
}
